package com.zhj.edu.messagecenterserver.mqtt;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "driver.mqtt")
public class MqttProperties {

    private String url;

    private AuthTypeEnum authType;

    private String username;

    private String password;

    private String clientKeyPass = "qf-client";

    private int qos;

    private String defaultSendTopic;

    private String client;

    private Integer keepAlive = 15;

    private Integer completionTimeout = 3000;

    /**
     * Mqtt 权限认证类型枚举
     */
    @NoArgsConstructor
    public enum AuthTypeEnum {
        NONE, CLIENT_ID, USERNAME, X509
    }
}
